package com.alfayun.fiscalriskanalysis.another.specification.indicator;

import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

import com.alfayun.fiscalriskanalysis.another.indicator.Measure;
import com.alfayun.fiscalriskanalysis.another.indicator.Measures;
import com.alfayun.fiscalriskanalysis.another.indicator.Selector;
import com.alfayun.fiscalriskanalysis.another.indicator.Selectors;

public final class IndicatorSpec {

	private Set<SelectorSpec> selectors;
	private Set<MeasureSpec> measures;
	private Set<AlertSpec> alerts;

	private String name;
	private String description;
	private Set<String> tags;

	public List<Selector> buildSelectors() {
		return selectors.stream().map(Selectors::bind).collect(Collectors.toList());
	}

	public List<Measure> buildMeasures() {
		return measures.stream().map(Measures::create).collect(Collectors.toList());
	}

//	public Collection<SelectorSpec> getAllSelectors() {
//		return selectors;
//	}
//
//	public Set<MeasureSpec> getAllMeasures() {
//		return measures;
//	}
//
//	public Set<AlertSpec> getAllAlerts() {
//		return alerts;
//	}
}
